﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MaymuseMS.Controllers
{
    public class ProductController : GenericController
    {
        //
        // GET: /Product/
        public ActionResult Index()
        {

            return View();
        }

        public ActionResult Get(int id) {
            var p = unitOfWork.ProductRepository.Get(id);
            if (p == null) 
                return Json2(new { success = false, massage = errorMessage });
            return Json2(new { success = true, name = p.Name});
        }
    }
}
